/**
 * 公共基础接口封装
 */
 import request from '@/utils/request'

// 获取用户信息
 export const getLoginInfo = () => {
   return request({
     method: 'GET',
     url: '/login/info'
   })
 }

// 获取图片验证码
 export const getCaptcha = () => {
   return request<Blob>({
     method: 'GET',
     url: '/captcha_pro',
     params: {
      stamp: Date.now()
    },
     responseType: 'blob'
   })
 }

// 登录
 export const login = (data: {
  account: string,
  pwd: string,
  imgcode: string
 }) => {
   return request({
     method: 'POST',
     url: '/login',
     data
   })
 }
 
// 退出登录
 export const logout = () => {
   return request({
     method: 'GET',
     url: '/setting/admin/logout',
   })
 }